/* Javascript file to pop up windows for a new user */
/* Make an element and call make_user */
function make_user() {
    /* Div to ask about a faction */
    document.body.appendChild(new Element("div", {
        html:   "<P>Please choose a faction<BR></P>\
        <FORM>
        <INPUT TYPE='radio' NAME='faction' VALUE='D'>Democratist<BR>
        <INPUT TYPE='radio' NAME='faction' VALUE='C'>Communist<BR>
        <INPUT TYPE='radio' NAME='faction' VALUE='I'>Watchers<BR>
        <INPUT TYPE='radio' NAME='faction' VALUE='H'>Hactivists<BR>
        </FORM>",
        id:     "gender_div",
        style:  "display:none",
    });

    document.body.appendChild(new Element
    /* Gender popup */
    var gender_popup = new moopopup({
        title:          "Gender Popup Window",
        draggable:      false,
        resizable:      false,
        overlay_click_close_window:     false,
        html_node:      "gender_div",
    });
    gender_popup.display();


    /* Old code below
    var request = new Request({
        url:    "/newuser",
        data:   {},
        link:   "ignore",
        onSuccess:      function(responseText){uid = responseText;},
        async:      false,
    });
    request.post(); */
}
/* Load the new user's COP */
/* Great place for a potential bug. */
/* It may not be defined here and we may not have a user when */
/* it tries to load the kml in planner.js */
if (!(typeof ge === 'undefined')) {
    fetchKML(ge);
}